<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        div{
            width: 400px;
            height: 400px;
            border: 1px solid red;
            perspective:1400px;
            transform-style:preserve-3d;
            -webkit-transform-style:preserve-3d;
        }
        img{
            width: 100px;
            height: 100px;
            transform: translate3d(10px,20px,50px);
            -webkit-transform:translate3d(10px,20px,50px);
        }
        .img1{
            transform: translateZ(50px);
            -webkit-transform:translateZ(50px);
        }

    </style>
</head>
<body>
    <div>
        <img src="img/pic_01.png" id="image"/>
    </div>
  <input type="button" value="改变" onclick="fn1()">
 <script type="text/javascript">
       function fn1(){
           var image=document.getElementById("image");
           image.className="img1";
       }

 </script>
</body>
</html>